@model EditDictionaryViewModel
@{
	ViewData.SetLayoutModel(new LayoutModel(nameof(ServerNavPages.Translations), Context.GetRouteValue("dictionary") as string)
        .SetCategory(WellKnownCategories.Server));
}

<form method="post" class="d-flex flex-column">
	<div class="sticky-header">
		<nav aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item">
					<a asp-action="ListDictionaries" text-translate="true">Dictionaries</a>
				</li>
				<li class="breadcrumb-item active" aria-current="page" text-translate="true">@ViewData["Title"]</li>
			</ol>
			<h2 text-translate="true">@ViewData["Title"]</h2>
		</nav>
		<div>
			<button cheat-mode="true" class="btn btn-outline-info" name="command" value="Fake" text-translate="true">Fill fake</button>
			<button id="page-primary" type="submit" class="btn btn-primary" name="command" value="Save" text-translate="true">Save</button>
		</div>
	</div>
	<partial name="_StatusMessage" />

	<div class="d-flex mb-4">
		<div class="flex-fill">
			<p>@ViewLocalizer["Translations are formatted as JSON; for example, <b>{0}</b> translates <b>{1}</b> to <b>{2}</b>.", "{ \"Welcome\": \"Bienvenue\" }", "Welcome", "Bienvenue"]</p>
			<p class="mb-0" text-translate="true">
				To use the translation from this dictionary's fallback, you can:
			</p>
            <ul>
                <li text-translate="true">Remove the translation from this dictionary.</li>
                <li text-translate="true">Set the translation to match the string in the fallback.</li>
            </ul>
			<p class="mb-0" text-translate="true">Please note that not all text is translatable, and future updates may modify existing translations or introduce new translatable phrases.</p>
		</div>
	</div>

	<div class="row">
		<div class="col-xl-8 col-xxl-constrain d-flex flex-column">
			<div class="form-group">
				<label asp-for="Translations" class="form-label"></label>
				<textarea asp-for="Translations" class="form-control translation-editor" rows="@Model.Lines" cols="40"></textarea>
				<span asp-validation-for="Translations" class="text-danger"></span>
			</div>
		</div>
	</div>
</form>
